Skip to content

Add basePackage to BoundedContext (#375) - #385

Draft
stefan-ka wants to merge 1 commit into
feature/374-aggregate-invariantsfrom
feature/375-base-package
Draft

stefan-ka wants to merge 1 commit into
feature/374-aggregate-invariantsfrom
feature/375-base-package

Conversation

@stefan-ka

@stefan-ka stefan-ka commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Part of #375 (the issue stays open: this PR only covers basePackage).

Stacked on #384; the base branch is feature/374-aggregate-invariants, so the diff only shows this feature.

Changes

  • Grammar: new optional basePackage attribute on BoundedContext, using the same JavaIdentifier rule as basePackage on Modules; the = is optional like for the other Bounded Context attributes:
    BoundedContext TicketSales implements FareSales {
      basePackage = com.transit.ticketsales
    }
    
  • Formatter: basePackage starts on a new line.
  • Tests: with and without =, next to a Module with its own basePackage, and an invalid package (parse error).

Not included (still open in #375)

basePackage was already a keyword (Modules), so no highlighting change in the VS Code extension is needed.

Docs: ContextMapper/contextmapper.github.io#106

@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.8%. Comparing base (22d2766) to head (bb9e147).

Additional details and impacted files
@@                        Coverage Diff                         @@
##             feature/374-aggregate-invariants    #385   +/-   ##
==================================================================
  Coverage                                91.8%   91.8%           
- Complexity                               2236    2237    +1     
==================================================================
  Files                                     211     211           
  Lines                                    5961    5961           
  Branches                                  811     811           
==================================================================
+ Hits                                     5473    5474    +1     
  Misses                                    232     232           
+ Partials                                  256     255    -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@stefan-ka
stefan-ka force-pushed the feature/375-base-package branch from 0389a6f to c1b9e4f Compare October 20, 2026 21:55
@stefan-ka
stefan-ka force-pushed the feature/374-aggregate-invariants branch from 1bf8a4f to ab35ff8 Compare October 20, 2026 21:55
Declares where a Bounded Context lives in the code, e.g.

  basePackage = com.transit.ticketsales

Same syntax as on Modules (dot-separated identifiers), the equal sign is
optional like for the other Bounded Context attributes.
@stefan-ka
stefan-ka force-pushed the feature/375-base-package branch from c1b9e4f to bb9e147 Compare November 19, 2026 16:33
@stefan-ka
stefan-ka force-pushed the feature/374-aggregate-invariants branch from ab35ff8 to 22d2766 Compare November 19, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant